import { createStore } from 'vuex'

export default createStore({
  state: {
    userInfo: JSON.parse(sessionStorage.getItem("userInfo"))
  },
  getters: {
  },
  mutations: {
    setUserInfo(state, payload) {
      state.userInfo = payload
      sessionStorage.setItem("userInfo", JSON.stringify(payload))
    }
  },
  actions: {
  },
  modules: {
  }
})
